home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / include / scribus-ng / vruler.h < prev   
Encoding:
C/C++ Source or Header  |  2008-07-03  |  2.3 KB  |  77 lines

  1. /*
  2. For general Scribus (>=1.3.2) copyright and licensing information please refer
  3. to the COPYING file provided with the program. Following this notice may exist
  4. a copyright and/or license notice that predates the release of Scribus 1.3.2
  5. for which a new license (GPL+exception) is in place.
  6. */
  7. /***************************************************************************
  8.                           vruler.h  -  description
  9.                              -------------------
  10.     begin                : Wed Apr 11 2001
  11.     copyright            : (C) 2001 by Franz Schmid
  12.     email                : Franz.Schmid@altmuehlnet.de
  13.  ***************************************************************************/
  14.  
  15. /***************************************************************************
  16.  *                                                                         *
  17.  *   This program is free software; you can redistribute it and/or modify  *
  18.  *   it under the terms of the GNU General Public License as published by  *
  19.  *   the Free Software Foundation; either version 2 of the License, or     *
  20.  *   (at your option) any later version.                                   *
  21.  *                                                                         *
  22.  ***************************************************************************/
  23.  
  24. #ifndef VRULER_H
  25. #define VRULER_H
  26.  
  27. #include <QWidget>
  28. #include "scribusapi.h"
  29.  
  30. class QPaintEvent;
  31. class QMouseEvent;
  32. class PrefsManager;
  33. class RulerGesture;
  34. class ScribusDoc;
  35. class ScribusView;
  36.  
  37. /** \brief Vertical ruler
  38. \author Franz Schmid
  39. */
  40. class SCRIBUS_API Vruler : public QWidget
  41. {
  42.     Q_OBJECT
  43.  
  44. public:
  45.     Vruler(ScribusView *pa, ScribusDoc *doc);
  46.     ~Vruler() {};
  47.     void paintEvent(QPaintEvent *e);
  48.     void mousePressEvent(QMouseEvent *m);
  49.     void mouseReleaseEvent(QMouseEvent *m);
  50.     void mouseMoveEvent(QMouseEvent *m);
  51.     void drawNumber(QString num, int starty, QPainter *p);
  52.     double offs;
  53.     bool repainted;
  54.     int oldMark;
  55.     bool Mpressed;
  56. private: // Private attributes
  57.     /** Zeichensatz des Lineals */
  58.     ScribusDoc *currDoc;
  59.     ScribusView *currView;
  60.  
  61. public slots: // Public slots
  62.     /** \brief draw mark
  63.     \param where where to draw */
  64.     void Draw(int where);
  65.     void unitChange();
  66.  
  67. private:
  68.     double iter, iter2;
  69.     double cor;
  70.     bool drawMark;
  71.     int whereToDraw;
  72.     PrefsManager *prefsManager;
  73.     RulerGesture* rulerGesture;
  74. };
  75.  
  76. #endif
  77.